<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>C language - cppreference.com</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">


<link rel="shortcut icon" href="../../favicon.ico">



<link rel="stylesheet" href="../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-css:7:472787eddcf4605d11de8c7ef047234f */</style>

<script src="../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"c/language","wgTitle":"c/language","wgCurRevisionId":75974,"wgArticleId":6037,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"c/language","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-js:7:ca03345b1e2c4d90a25d968753a73b92 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]-->
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-c_language skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        
        <!-- /header -->
        <!-- content -->
        <div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
                <h1 id="firstHeading" class="firstHeading">C language</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">From cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../c.html" title="c">c</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
<div class="t-navbar" style="">
<div class="t-navbar-sep"> </div>
<div class="t-navbar-head">
<a href="../c.html" title="c"> C</a><div class="t-navbar-menu"><div>
<div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <strong class="selflink"> Language</strong> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="header.html" title="c/header"> headers</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="types.html" title="c/types"> Type support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="memory.html" title="c/memory"> Dynamic memory management</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="error.html" title="c/error"> Error handling</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="program.html" title="c/program"> Program utilities</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="variadic.html" title="c/variadic"> Variadic function support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="chrono.html" title="c/chrono"> Date and time utilities</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="string.html" title="c/string"> Strings library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="algorithm.html" title="c/algorithm"> Algorithms</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="numeric.html" title="c/numeric"> Numerics</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="io.html" title="c/io"> Input/output support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="locale.html" title="c/locale"> Localization support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="thread.html" title="c/thread"> Thread support</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="atomic.html" title="c/atomic"> Atomic operations</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="experimental.html" title="c/experimental"><span class="t-lines"><span>Technical Specifications</span></span></a></div></div></td></tr>
</table></div>
<div></div>
</div></div>
</div>
<div class="t-navbar-sep"> </div>
<div class="t-navbar-head">
<strong class="selflink"> C language</strong><div class="t-navbar-menu"><div>
<div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/ascii.html" title="c/language/ascii"><span class="t-lines"><span>ASCII chart</span></span></a></div></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/basic_concepts.html" title="c/language/basic concepts">Basic concepts</a>
</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/translation_phases.html" title="c/language/translation phases"><span class="t-lines"><span>translation phases</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="comment.html" title="c/comment"><span class="t-lines"><span>comment</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/identifier.html" title="c/language/identifier"><span class="t-lines"><span>identifier</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/scope.html" title="c/language/scope"><span class="t-lines"><span>scope</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/lifetime.html" title="c/language/lifetime"><span class="t-lines"><span>lifetime</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/name_space.html" title="c/language/name space"><span class="t-lines"><span>name space</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/compatible_type.html" title="c/language/type"><span class="t-lines"><span>type</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/arithmetic_types.html" title="c/language/arithmetic types"><span class="t-lines"><span>arithmetic types</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/object.html" title="c/language/object"><span class="t-lines"><span>object</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/main_function.html" title="c/language/main function"><span class="t-lines"><span>main function</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/memory_model.html" title="c/language/memory model"><span class="t-lines"><span>memory model</span></span></a></div></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="keyword.html" title="c/keyword"> Keywords</a>
</td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="preprocessor.html" title="c/preprocessor"> Preprocessor</a>
</td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/statements.html" title="c/language/statements"> Statements</a>
</td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/expressions.html" title="c/language/expressions"> Expressions</a>
</td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/initialization.html" title="c/language/initialization"> Initialization</a>
</td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/declarations.html" title="c/language/declarations"> Declarations</a>
</td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/functions.html" title="c/language/functions"> Functions</a>
</td></tr>
<tr class="t-nv-h2"><td colspan="5"> Miscellaneous</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="language/history.html" title="c/language/history"><span class="t-lines"><span>history of C</span></span></a></div></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="experimental.html" title="c/experimental">Technical Specifications</a> </td></tr>
</table></div>
<div></div>
</div></div>
</div>
<div class="t-navbar-sep"> </div>
</div>
<p>This is a reference of the core C language constructs.
</p>
<table cellpadding="5">

<tr valign="top">
<td>
<p><b><a href="language/basic_concepts.html" title="c/language/basic concepts"> Basic concepts</a></b>
</p>
<div class="mainpagediv">
<p><a href="comment.html" title="c/comment"> Comments</a><br>
<a href="language/ascii.html" title="c/language/ascii"> ASCII chart</a><br>
<a href="language/translation_phases.html" title="c/language/translation phases"> Translation phases</a><br>
<a href="language/identifier.html" title="c/language/identifier"> identifier </a> -
<a href="language/scope.html" title="c/language/scope"> scope</a> -
<a href="language/lifetime.html" title="c/language/lifetime"> lifetime</a><br>
<a href="language/name_space.html" title="c/language/name space"> lookup and name spaces</a><br>
<a href="language/compatible_type.html" title="c/language/type"> type</a> - 
<a href="language/arithmetic_types.html" title="c/language/arithmetic types"> arithmetic types</a><br>
<a href="language/object.html" title="c/language/object"> objects and alignment</a> <br>
<a href="language/main_function.html" title="c/language/main function"> The <code>main</code> function</a><br>
<a href="language/memory_model.html" title="c/language/memory model"> Memory model and data races</a><br>
</p>
</div>
<p><b><a href="keyword.html" title="c/keyword"> Keywords</a></b>
</p>
<div class="mainpagediv">
</div>
<p><b><a href="preprocessor.html" title="c/preprocessor"> Preprocessor</a></b>
</p>
<div class="mainpagediv">
<p><a href="preprocessor/conditional.html" title="c/preprocessor/conditional"> #if - #ifdef - #ifndef</a><br>
<a href="preprocessor/replace.html" title="c/preprocessor/replace"> #define - # - ##</a><br> 
<a href="preprocessor/include.html" title="c/preprocessor/include"> #include</a> -
<a href="preprocessor/impl.html" title="c/preprocessor/impl"> #pragma</a><br>
<a href="preprocessor/line.html" title="c/preprocessor/line"> #line</a> -
<a href="preprocessor/error.html" title="c/preprocessor/error"> #error</a><br>
</p>
</div>
<p><b><a href="language/statements.html" title="c/language/statements"> Statements</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/if.html" title="c/language/if"> <code>if</code></a> -
<a href="language/switch.html" title="c/language/switch"> <code>switch</code></a><br>
<a href="language/for.html" title="c/language/for"> <code>for</code></a><br>
<a href="language/while.html" title="c/language/while"> <code>while</code></a> - <a href="language/do.html" title="c/language/do"> <code>do</code>-<code>while</code></a><br>
<a href="language/continue.html" title="c/language/continue"> <code>continue</code></a> -
<a href="language/break.html" title="c/language/break"> <code>break</code></a><br>
<a href="language/goto.html" title="c/language/goto"> <code>goto</code></a> -
<a href="language/return.html" title="c/language/return"> <code>return</code></a><br>
</p>
</div>
</td>
<td>
<p><b><a href="language/expressions.html" title="c/language/expressions"> Expressions</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/value_category.html" title="c/language/value category"> Value categories</a><br> 
<a href="language/eval_order.html" title="c/language/eval order"> Evaluation order and sequencing</a><br> 
<a href="language/expressions.html#Constants_and_literals" title="c/language/expressions"> Constants and literals</a><br>
 <a href="language/integer_constant.html" title="c/language/integer constant"> integer constants</a><br>
 <a href="language/floating_constant.html" title="c/language/floating constant"> floating constants</a><br>
 <a href="language/character_constant.html" title="c/language/character constant"> character constants</a><br>
 <a href="language/string_literal.html" title="c/language/string literal"> string literals</a><br>
 <a href="language/compound_literal.html" title="c/language/compound literal"> compound literals</a><span class="t-mark-rev t-since-c99">(C99)</span><br>
<a href="language/constant_expression.html" title="c/language/constant expression"> Constant expressions</a><br>
<a href="language/conversion.html" title="c/language/conversion"> Implicit conversions</a> <br>
<a href="language/expressions.html#Operators" title="c/language/expressions">Operators</a><br>
 <a href="language/operator_member_access.html" title="c/language/operator member access"> member access and indirection</a><br>
 <a href="language/operator_logical.html" title="c/language/operator logical"> logical</a> -
<a href="language/operator_comparison.html" title="c/language/operator comparison"> comparison</a><br>
 <a href="language/operator_arithmetic.html" title="c/language/operator arithmetic"> arithmetic</a> -
<a href="language/operator_assignment.html" title="c/language/operator assignment"> assignment</a><br>
 <a href="language/operator_incdec.html" title="c/language/operator incdec"> increment and decrement</a><br>
 <a href="language/operator_other.html" title="c/language/operator other"> call, comma, ternary</a><br>
 <a href="language/sizeof.html" title="c/language/sizeof"> <code>sizeof</code></a> -
<a href="language/alignof.html" title="c/language/ Alignof"> <code>alignof</code></a><span class="t-mark-rev t-since-c11">(C11)</span><br>
 <a href="language/cast.html" title="c/language/cast"> cast operators</a><br>
<a href="language/operator_precedence.html" title="c/language/operator precedence"> Operator precedence</a><br>
<a href="language/generic.html" title="c/language/generic"> Generic selection</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
</p>
</div>
<p><b><a href="language/initialization.html" title="c/language/initialization"> Initialization</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/scalar_initialization.html" title="c/language/scalar initialization"> scalar</a><br>
<a href="language/array_initialization.html" title="c/language/array initialization"> array</a><br>
<a href="language/struct_initialization.html" title="c/language/struct initialization"> structure/union </a><br>
</p>
</div>
</td>
<td>
<p><b><a href="language/declarations.html" title="c/language/declarations"> Declarations</a></b> 
</p>
<div class="mainpagediv">
<p><a href="language/pointer.html" title="c/language/pointer"> Pointers</a> -
<a href="language/array.html" title="c/language/array"> Arrays</a><br>
<a href="language/enum.html" title="c/language/enum"> Enumerations</a><br>
<a href="language/storage_duration.html" title="c/language/storage duration"> Storage duration and linkage </a><br>
<a href="language/const.html" title="c/language/const">const</a> - <a href="language/volatile.html" title="c/language/volatile">volatile</a> - <a href="language/restrict.html" title="c/language/restrict">restrict</a><span class="t-mark-rev t-since-c99">(C99)</span><br>
<a href="language/struct.html" title="c/language/struct"> struct </a> - <a href="language/union.html" title="c/language/union"> union</a> -
<a href="language/bit_field.html" title="c/language/bit field"> bit fields</a><br>
<a href="language/alignas.html" title="c/language/ Alignas"> <code>alignas</code></a><span class="t-mark-rev t-since-c11">(C11)</span> -
<a href="language/typedef.html" title="c/language/typedef"> <code>typedef</code></a><br>
<a href="language/static_assert.html" title="c/language/ Static assert"> static_assert</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
<a href="language/atomic.html" title="c/language/atomic"> Atomic types</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
<a href="language/extern.html" title="c/language/extern"> External and tentative definitions</a><br>
</p>
</div>
<p><b><a href="language/functions.html" title="c/language/functions"> Functions</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/function_declaration.html" title="c/language/function declaration"> Function declaration</a><br>
<a href="language/function_definition.html" title="c/language/function definition"> Function definition</a><br>
<a href="language/inline.html" title="c/language/inline">inline</a><span class="t-mark-rev t-since-c99">(C99)</span> - <a href="language/noreturn.html" title="c/language/ Noreturn">noreturn</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
<a href="language/variadic.html" title="c/language/variadic"> Variadic arguments</a><br>
</p>
</div>
<p><b>Miscellaneous</b>
</p>
<div class="mainpagediv">
<p><a href="language/history.html" title="c/language/history"> History of C</a><br>
<a href="http%3A//en.cppreference.com/mwiki/index.php" class="new" title="c/language/asm (page does not exist)"> Inline assembly</a><br>
<a href="http%3A//en.cppreference.com/mwiki/index.php" class="new" title="c/language/as if (page does not exist)"> As-if rule</a><br>
<a href="http%3A//en.cppreference.com/mwiki/index.php" class="new" title="c/language/signal (page does not exist)"> signal handling</a> <br>
<a href="language/analyzability.html" title="c/language/analyzability"> Analyzability</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
</p>
<br>
</div>
<p><br>
</p>
</td>
</tr>
</table>
<h3>
<span class="editsection">[<a href="http%3A//en.cppreference.com/mwiki/index.php" title="Edit section: See also">edit</a>]</span> <span class="mw-headline" id="See_also">See also</span>
</h3>
<table class="t-dsc-begin">

<tr class="t-dsc">
<td colspan="2"> <div class="t-dsc-see">
<span><a href="../cpp/language.1.html" title="cpp/language">C++ documentation</a></span> for <span class="t-dsc-see-tt"><span>C++ language constructs</span></span>
</div>
</td>
</tr>

</table>

<!-- 
NewPP limit report
Preprocessor visited node count: 1256/1000000
Preprocessor generated node count: 3239/1000000
Post‐expand include size: 35709/2097152 bytes
Template argument size: 4266/2097152 bytes
Highest expansion depth: 13/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_en_:pcache:idhash:6037-0!*!0!*!*!*!* and timestamp 20150227205135 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    Retrieved from "<a href="http%3A//en.cppreference.com/mwiki/index.php">http://en.cppreference.com/mwiki/index.php?title=c/language&amp;oldid=75974</a>"                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <div id="catlinks" class="catlinks catlinks-allhidden"></div>                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../../common/site_scripts.js"></script>

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.410 secs. -->
	</body>
<!-- Cached 20150227205135 -->
</html>
